package main

import "fmt"

func main() {
	indices := [][]int{[]int{0,1},[]int{1,1}}
	c := oddCells(2, 3,indices )
	fmt.Println(c)

}

func oddCells(n int, m int, indices [][]int) int {

	list := [][]int{}
	for i := 0; i < n; i++ {
		list = append(list, make([]int, m))
	}
	for _, num := range indices {
		numA := num[0]
		numB := num[1]
		for j:= 0; j<len(list[numA]);j++{
			list[numA][j] ++
		}
		for _,m := range list {
			m[numB] ++
		}

	}
	count := 0
	for _,ns := range list{
		for _,n := range ns{
			if n % 2 != 0{
				count ++
			}
		}
	}
	return count
}
